<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico">
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
    <!-- bootstrap-table 表格插件样式 -->
    <link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/animate.css}" rel="stylesheet"/>
    <link th:href="@{/css/style.css}" rel="stylesheet"/>
    <link th:href="@{/ruoyi/css/ry-ui.css}" rel="stylesheet"/>
    <link th:href="@{/css/my.css}" rel="stylesheet"/>
    <!-- layui -->
    <script th:src="@{/ajax/libs/layui/layui.js}"></script>

    <!--页面样式文件-->
    <link rel="stylesheet" th:href="@{/dist/css/main.css}">
</head>

<body class="bd-bg">
<!--右侧主体-->

<div class="Greenhouse02">
    <div class="Greenhouse02-main">

        <div class="row rowNew">
            <div class="col-xs-12 col-sm-12 middle-graph">
                <div class="time" th:text="'温室：' + ${pengCount} +'个'">温室：22个</div>
            </div>
        </div>

        <div class="bottom-graph">
            <div class="row rowNew">

                <div class="item col-sm-6 col-md-4 col-lg-3" th:each="peng:${pengs}" th:id="${peng.deptId}"
                     th:attr="uuid = *{peng.uuid}">
                    <div class="item-box">
                        <div class="top">
                            <div class="left" th:text="${peng.deptName}">一号温室</div>
                            <div class="right"><a th:href="@{/system/iot/data} + '?tp_id=' + ${peng.params.tp_id}">详情</a></div>
                        </div>
                        <div class="mid">
                            <div class="weather-item clearfix first">
                                <div class="left fl">
                                    <div class="w-icon fl"><img th:src="@{/dist/img/greenHouse-icon01.png}" alt="">
                                    </div>
                                    <div class="w-name fl">空气湿度</div>
                                </div>
                                <div class="right fr">
                                    <div class="w-data"><span class="num" th:text="${peng.params.Channel2}">71.7</span>%</div>
                                </div>
                            </div>
                            <div class="weather-item clearfix first">
                                <div class="left fl">
                                    <div class="w-icon fl"><img th:src="@{/dist/img/greenHouse-icon02.png}" alt="">
                                    </div>
                                    <div class="w-name fl">空气温度</div>
                                </div>
                                <div class="right fr">
                                    <div class="w-data"><span class="num" th:text="${peng.params.Channel1}">32</span>℃</div>
                                </div>
                            </div>
                            <div class="weather-item clearfix first">
                                <div class="left fl">
                                    <div class="w-icon fl"><img th:src="@{/dist/img/greenHouse-icon03.png}" alt="">
                                    </div>
                                    <div class="w-name fl">土壤湿度</div>
                                </div>
                                <div class="right fr">
                                    <div class="w-data"><span class="num" th:text="${peng.params.Channel6}">40</span>%</div>
                                </div>
                            </div>
                            <div class="weather-item clearfix first">
                                <div class="left fl">
                                    <div class="w-icon fl"><img th:src="@{/dist/img/greenHouse-icon04.png}" alt="">
                                    </div>
                                    <div class="w-name fl">土壤温度</div>
                                </div>
                                <div class="right fr">
                                    <div class="w-data"><span class="num" th:text="${peng.params.Channel5}">32</span>℃</div>
                                </div>
                            </div>
                        </div>
                        <div class="btm row rowNew">
                            <div class="left col-xs-6"><a onclick="onPlan(this)"
                                                          th:text="'执行计划:('+${peng.planCount}+')'">执行计划（2）</a></div>
                            <div class="right col-xs-6"><a th:href="@{/system/iot/ctrl} + '?tp_id=' + ${peng.params.tp_id}"><i class="icon"><img
                                    th:src="@{/dist/img/greenHouse-icon.png}" alt=""></i><span>智能控制</span></a></div>
                        </div>
                    </div>
                </div>

            </div>
        </div>

    </div>
</div>

<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<!-- 遮罩层 -->
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
<script th:src="@{/ruoyi/js/common.js?v=3.4.0}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=3.4.0}"></script>
<script th:src="@{/js/ry-ui.js?v=3.4.0}"></script>
<script th:src="@{/ruoyi/js/my-common-js.js}"></script>
<script th:inline="javascript">
    var ctx = [[@{
        /}]];

        function onPlan(e) {
            var deptId = $(e).parents('.item').attr('id');
            var link = ctx + 'system/front_wenshi/frontPlans?deptId=' + deptId;
            $.modal.openTab('正在执行计划', link);

        }

        function autoCtrl(e) {
            var uuid = $(e).parents('.item').attr('uuid');
            var url = baseWlwUrl + '/product.html?uuid=' + uuid+'&tp_id='+$(e).attr('tp_id');
            $.modal.openTab('智能控制', url);
        }
        setTitle("温室管理",false)
</script>
</body>

</html>
